//
//  WCANetworkManager.h
//  WeChatAssistant
//
//  Created by Guo Rui on 2017/11/23.
//  Copyright © 2017年 GR Harry. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "WCAHTTPRequestSerializer.h"

typedef void(^WCARequestSuccessBlock)(NSURLSessionDataTask *task, id responseObject);
typedef void(^WCARequestFailureBlock)(NSURLSessionDataTask *task, NSError *error);

@interface WCASessionManager : NSObject

+ (instancetype)manager;

+ (NSURLSessionDataTask *)GET:(NSString *)url parameters:(id)parameters success:(WCARequestSuccessBlock)success failure:(WCARequestFailureBlock)failure;
+ (NSURLSessionDataTask *)POST:(NSString *)url parameters:(id)parameters success:(WCARequestSuccessBlock)success failure:(WCARequestFailureBlock)failure;

- (void)setBaseURLString:(NSString *)urlString;
+ (void)setRequestSerialization:(WCAHTTPRequestSerializer *)serialization;

@property (strong, nonatomic) NSMutableDictionary *requestHeaderFieldValueDictionary;

@end
